package com.example.designpattern.structural.bridge.shape;

import com.example.designpattern.structural.bridge.color.IColor;

public class Triangle implements IShape {

    // 在每个形状类中，桥接 IColor 接口：
    private IColor color;

    public void setColor(IColor color) {
        this.color = color;
    }

    @Override
    public void draw() {
        System.out.println("绘制" + color.getColor() + "三角形");
    }
}
